let a99: string = "小明是个好学生";
a99 = "66666";
const a1: string = "小明是个好学生";
a99 = "111";
a99 = "asb";
a99 = 'asc';
/*a1 = 'aaa';*/
let a2: number = 12;
const a3: number = 13;
let a4: boolean = false;
const a5: boolean = true;
let a6: number[] = [1, 2, 3, 4];
let a7: Array<string> = ["aaa", "bb", "cc"];
let a8: any = 1;
let a9: any = "aaas";
let a10: void = undefined;
let a11: undefined = undefined;
let a12: null = null;
let a13: void = null;
let a14: object = { 'String': 'sss' };
const a15: object = { 'string': a1, 'number': 1, 'boolean': true };

/*function aad(x: number, y: number) {
	return x + y;
}

aad(1, 2)*/

function abc(x: string, y?: string, z?: number): string {
	//let c: string = x + y;
	return x + y;
}

console.log(abc('a', 'b'));

function xm(q: string, w: string, e?: string) {
	return q + w + e;
}

console.log(xm('科特', '康纳斯'));


function buildName1(firstName: string, lastName = "Smith") {
	return firstName + " " + lastName;
}

buildName1('11', 'ss');

function xm1(i: string, p: string, ...o: String[]) {
	return i + p + "" + o.join("");
}

xm1('科特', '康纳斯');


function hh11(g: string | number, j: string | number) {
	if (typeof g === "string" && typeof j === "string") {
		return g + j;
	} else if (typeof g === "number" && typeof j === "number") {
		return g + j;
	} else {
		return g.toString() + j.toString();
	}
}

interface Iaa {
	Izzs: string;
	size?: number;
}

function Las(Ia: Iaa): Iaa {
	console.log(Ia.Izzs);
	//let a = { Izzs: Ia.Izzs };
	return Ia;
}

let myobj = { size: 10, Izzs: "size 10 object", size1: 11, zzs1: "sss ggg hhhh" };
Las(myobj);

interface Iaa1 {
	I01: String;
}
interface Iaa2 {
	I02: Iaa1;
	I03: number;
}
function lastInt(li: Iaa2, li1: Iaa1) {
	return true;
}
let obj01 = { I01: 'aas', I02: { I01: 'sss' }, I03: 100 };
let obj02 = { I01: 'sssww' }
lastInt(obj01, obj02);